package message

import (
	"github.com/astaxie/beego/orm"
	"time"
)

type Msg struct {
	Id int `orm:"pk;auto;description(主键)"`
	Uname string `orm:"size(60);description(留言人姓名)"`
	Email string `orm:"size(100);description(邮件地址)"`
	Content string `orm:"size(500);description(留言内容)"`
	IsReply int `orm:"default(0);description(1已回复，0未回复)"`
	ReplyContent string `orm:"size(500);description(回复内容)"`
	IsDelete int `orm:"default(0);description(1删除，0未删除)"`
	ReplyTime time.Time `orm:"auto_now;type(datetime);description(回复时间);null"`
	CreateTime time.Time `orm:"auto_now;type(datetime);description(创建时间);null"`
}

func (M *Msg) TableName() string {
	return "sys_msg"
}

func init()  {
	orm.RegisterModel(new(Msg))
}